<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/24
 * Time: 11:49
 */

namespace App\Transformers;


use App\Models\UserAddress;
use League\Fractal\TransformerAbstract;

class UsersAddtrssTransformer extends TransformerAbstract
{
    public function transform(UserAddress $address){
        return [
            'user_id' => $address->user_id,
            'address' => $address->address,
            'zipcode' => $address->zipcode,
            'mobile' => $address->mobile,
            'is_default' => $address->is_default,
        ];
    }
}